import axios from 'axios'
axios.defaults.withCredentials=true;

let url = 'http://gzlmhan.work:3000'

export function getsearch(name){
  return axios({
    url: url+'/search',
    method: 'get',
    params: {keywords:name}
})
}

export function getplayLists(){
  return axios({
    url: url+'/personalized',
    method: 'get',
    params: {limit:9}
})
}
export function getBanners(){
  return axios({
    url: url+'/banner',
    method: 'get',
    // params: {limit:3}
})
}

// 获取歌单详情
export function playListDetail(id){
  return axios({
    url: url+'/playlist/detail',
    method: 'get',
    params: id
})
}
// 获取歌词
export function playlyric(id){
  return axios({
    url: url+'/lyric',
    method: 'get',
    params: {'id':id}
})
}
// 手机登录
export function getcellphone(phone,password){
  return axios({
    url: url+'/login/cellphone',
    method: 'get',
    params: {'phone':phone,'password':password}
})
}
// 获取用户详情 
export function getuserDetail(uid){
  return axios({
    url: url+'/user/detail',
    method: 'get',
    params: {'uid':uid}
})
}
// 获取用户歌单列表
export function getuserPlayList(uid){
  
  return axios({
    url: url+'/user/playlist',
    method: 'get',
    params: {'uid':uid}
})
}